/*
 * @Author       : Hejh(3010733382@qq.com)
 * @Version      : V1.0
 * @Date         : 2024-03-13 17:42:50
 * @Description  : 颜色主题的store
 */

import { defineStore } from 'pinia'
import type { IndexObj } from '@/types/commom'

const lightTheme = {
  primaryColor: '#000',
  'bg-light-1': '#fff',
  'bg-color-2': '#f0f2f5',
  panelColor: '#f0f2f5',
  textColor: '#445566',
  explorerColor: '#333333',
  'textColor-2': '#aaa'
}

const darkTheme = {}

interface colorStore {
  theme: IndexObj
}

export default defineStore('theme', {
  state(): colorStore {
    return {
      theme: lightTheme
    }
  },
  actions: {
    setTheme(type: 'light' | 'dark') {
      this.theme = type === 'dark' ? darkTheme : lightTheme
    }
  }
})
